#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<assert.h>

int main()
{
    int x = 12321;
    int a = 21;
    char* p = (char*)malloc(sizeof(char) * 10);
    assert(p);
    int j = 0;
    int i = 0;
    char* ps = p;
    while (*ps != '\0')
    {
        j++;
        ps++;
    }
    ps = NULL;
    sprintf(p, "%d", x);

    while (i < j)
    {
        if (p[i] == p[j])
        {
            i++;
            j--;
        }
        else
        {
            printf("0");
            return 0;
        }
        free(p);

        return 0;
    }


}